from urllib import request, parse
# Base URL being accessed
url = 'http://www.baidu.com/s'

# Dictionary of query parameters (if any)
parms = {
'wd' : 'python+logging',
'ie' : 'ie=UTF-8'
}
# Encode the query string
querystring = parse.urlencode(parms)
# Make a GET request and read the response
u = request.urlopen(url+'?' + querystring)
resp = u.read()
print(resp)